window: last size is more important than default size
authorBenjamin Otte <otte@redhat.com>
Wed, 1 May 2013 14:40:13 +0000 (16:40 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 1 May 2013 14:41:12 +0000 (16:41 +0200)
reorder size computation code to reflect that.

https://bugzilla.gnome.org/show_bug.cgi?id=696882

gtk/gtkwindow.c

index d509920c687341f7aa8a8385b3f96263b998ba42..16942b8ab3d9d41f82d79772c80db0d8c752e6e1 100644 (file)
@@ -7838,9 +7838,6 @@ gtk_window_compute_configure_request_size (GtkWindow   *window,
   info = gtk_window_get_geometry_info (window, FALSE);
 
   gtk_window_guess_default_size (window, width, height);
-  gtk_window_get_remembered_size (window, &w, &h);
-  *width = MAX (*width, w);
-  *height = MAX (*height, h);
 
   /* If window is empty so requests 0, default to random nonzero size */
    if (*width == 0 && *height == 0)
@@ -7850,7 +7847,6 @@ gtk_window_compute_configure_request_size (GtkWindow   *window,
      }
 
    /* Override with default size */
-
    if (info)
      {
        if (info->default_width > 0)
@@ -7864,6 +7860,11 @@ gtk_window_compute_configure_request_size (GtkWindow   *window,
                                   info->default_height > 0 ? height : NULL);
      }
 
+  /* Override with last size of this window */
+  gtk_window_get_remembered_size (window, &w, &h);
+  *width = MAX (*width, w);
+  *height = MAX (*height, h);
+
   /* Override any size with gtk_window_resize() values */
   if (info)
     {